package com.task.quartz.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.CountryInfo;
import com.task.common.info.DeptIdForAuthentication;
import com.task.common.info.DeviceFraudInfo;
import com.task.common.info.DeviceGroupInfo;
import com.task.common.info.FlowFilterInfo;
import com.task.common.info.IpFraudInfo;
import com.task.common.info.PluginInfo;
import com.task.common.info.ProxyInfo;
import com.task.common.info.RelationMissionDeviceFraud;
import com.task.common.info.RelationMissionDeviceGroup;
import com.task.common.info.RelationMissionFlowFilter;
import com.task.common.info.RelationMissionIpFraud;
import com.task.common.info.RelationMissionPlugin;
import com.task.common.info.RelationMissionProxy;

/**
 * @author 迪迦.
 * @date 2024/12/26 17:27
 */
@Mapper
public interface TaskMapper {

  Integer checkTableExist(@Param("tableName") String tableName);

  void createDataHistoryTable(@Param("tableName") String tableName);

  void insertHistoryTablesData(@Param("tableName") String tableName, @Param("tablePrefix") String tablePrefix);

  void createMissionHistoryTable(@Param("tableName") String tableName);

  void createDataIndexHistoryTable(@Param("tableName") String tableName);

  List<DeptIdForAuthentication> selectAddDeptAuthentication();

  List<RelationMissionDeviceFraud> getAllRelationMissionDeviceFraud();

  List<RelationMissionDeviceGroup> getAllRelationMissionDeviceGroup();

  List<RelationMissionFlowFilter> getAllRelationMissionFlowFilter();

  List<RelationMissionIpFraud> getAllRelationMissionIpFraud();

  List<RelationMissionPlugin> getAllRelationMissionPlugin();

  List<RelationMissionProxy> getAllRelationMissionProxy();

  List<DeviceFraudInfo> getAllDeviceFraudInfo();

  List<DeviceGroupInfo> getAllDeviceGroupInfo();

  List<FlowFilterInfo> getAllFlowFilterInfo();

  List<IpFraudInfo> getAllIpFraudInfo();

  List<PluginInfo> getAllPluginInfo();

  List<ProxyInfo> getAllProxyInfo();

  List<CountryInfo> getAllCountryInfo();

  List<String> getTablesNameByPreFromDatabase(String prefix);

  List<String> getTablesNameByPreFromTable(String prefix);

  void deleteTablesByNames(@Param("deleteTables") List<String> deleteTables);

  List<String> getRepeatTableCodes();

  void deleteRepeatTableCode(@Param("repeatTableCodes") List<String> repeatTableCodes);
}
